<template>
    <div class="jx-app-wrapper">
        <navbar :websockMsg="websockMsg"/>
        <transition name="slide-fade">
            <router-view :websockMsg="websockMsg" />
        </transition>
    </div>
</template>

<script>
    import Navbar from "@/components/NavToBar.vue";
    export default {
        props: ['websockMsg'],
        components: {
            Navbar
        },
        data() {
            return {
                flag: false
            }
        },
        created () {

        },
        methods: {
            signIn() {
                let self = this;
                self.$http.get("/tes/attendance/record").then(response => {
                    let res = response.data;
                    if (res.code == "200") {
                        self.$message({
                            message: "签到成功",
                            type: "success"
                        });
                        self.flag = false;
                        // self.InitWebSocket();
                    } else {
                        self.$message.error(res.message);
                        self.flag = false;
                    }
                });
            }
        }
    };
</script>
<style lang="scss" scoped>
    .slide-fade {
    }
    .slide-fade-enter-active {
        transition: all 1.2s ease;
    }
    .slide-fade-leave-active {
        transition: all 0.1s cubic-bezier(2, 0.5, 0.8, 1);
    }
    .slide-fade-enter,
    .slide-fade-leave-to {
        opacity: 0;
    }
</style>
